/** @file dumpdev-espdata.h
 *  @brief This file contains ESP encrypted reference data to feed the dumpdev device (used for tests)
 */


/**
  * Sequence of dumped reference packets
  **/

typedef enum dumpdev_packet_type_list {
	INBOUND  = 0,
	OUTBOUND = 1
} dumpdev_packet_type;


/** structure of a single packet */
typedef struct dumpdev_packet_struct
{
	dumpdev_packet_type packet_type;	/** define if packet is INBOUND or OUTBOUND */
	unsigned int size; 					/** packet size in bytes */
	unsigned char *payload;				/** packet payload */
} dumpdev_packet;



/**
 * Recorded data of a ping sequence from host 192.168.1.2 (PC) to
 * 192.168.1.3 (MCB 167-NET board)
 */

//  Source File: 01 - PC ARP request.bin
unsigned char esp_data_1[114] =
{
    0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3, 0x00, 0xA0, 0x24, 0x15, 0x3E, 0x12, 0x08, 0x00, 0x45, 0x00,
    0x00, 0x64, 0x3E, 0x27, 0x00, 0x00, 0x40, 0x32, 0xB8, 0xE8, 0xC0, 0xA8, 0x01, 0x05, 0xC0, 0xA8,
    0x01, 0x03, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x06, 0x5E, 0x1C, 0x76, 0x97, 0x9B, 0x78, 0xBF,
    0x71, 0x2A, 0xE9, 0x44, 0x6D, 0xDC, 0x74, 0xDE, 0xBF, 0x5A, 0x38, 0xE1, 0x7E, 0xE3, 0x41, 0x01,
    0x02, 0x2E, 0xEB, 0xDC, 0x6F, 0xC5, 0xE3, 0x28, 0x71, 0x2B, 0xDB, 0x6E, 0xD3, 0x69, 0x19, 0x86,
    0xFA, 0x49, 0xAD, 0xA7, 0xD1, 0x25, 0x07, 0x34, 0x2F, 0xEB, 0x69, 0x7B, 0x6E, 0xDC, 0xB1, 0x33,
    0x21, 0xC3, 0x61, 0x69, 0x5A, 0xDE, 0x8F, 0xDC, 0xD9, 0xA6, 0x87, 0x40, 0x48, 0x7D, 0xFE, 0xB4,
    0xFD, 0x3F,
} ;

unsigned char esp_data_2[98] =
{
    0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3, 0x00, 0xA0, 0x24, 0x15, 0x3E, 0x12, 0x08, 0x00, 0x45, 0x00,
    0x00, 0x54, 0x3E, 0x28, 0x00, 0x00, 0x40, 0x32, 0xB8, 0xF7, 0xC0, 0xA8, 0x01, 0x05, 0xC0, 0xA8,
    0x01, 0x03, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x06, 0x5F, 0x87, 0x40, 0x48, 0x7D, 0xFE, 0xB4,
    0xFD, 0x3F, 0x06, 0xB3, 0x8A, 0x64, 0x73, 0x3E, 0x0B, 0x11, 0xD2, 0x97, 0x22, 0x9E, 0x3D, 0x4C,
    0x02, 0xAB, 0x52, 0x46, 0xB1, 0x6A, 0x27, 0x6B, 0x7F, 0x3F, 0x35, 0x45, 0x0B, 0x1B, 0xF6, 0xE8,
    0xF9, 0x25, 0x7D, 0x09, 0x78, 0x6F, 0xD2, 0x55, 0xD9, 0x00, 0x6F, 0xE9, 0x6B, 0xFE, 0x91, 0xCF,
    0x3C, 0x29,
} ;

unsigned char esp_data_3[98] =
{
    0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3, 0x00, 0xA0, 0x24, 0x15, 0x3E, 0x12, 0x08, 0x00, 0x45, 0x00,
    0x00, 0x54, 0x3E, 0x29, 0x00, 0x00, 0x40, 0x32, 0xB8, 0xF6, 0xC0, 0xA8, 0x01, 0x05, 0xC0, 0xA8,
    0x01, 0x03, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x06, 0x60, 0x6F, 0xE9, 0x6B, 0xFE, 0x91, 0xCF,
    0x3C, 0x29, 0xD0, 0x0F, 0xD8, 0x70, 0x88, 0x9F, 0xCE, 0xA4, 0xC2, 0x27, 0x53, 0x09, 0x8C, 0x6B,
    0x80, 0xBE, 0x19, 0xFA, 0x81, 0xAF, 0xDC, 0x90, 0x4B, 0xAB, 0x9D, 0xE8, 0xC1, 0xFC, 0x76, 0x79,
    0xBF, 0x8C, 0x5D, 0x46, 0xEA, 0x03, 0x34, 0xF1, 0x40, 0x92, 0xA8, 0xE5, 0x1A, 0xC4, 0x8A, 0x04,
    0x3F, 0x1B,
} ;

unsigned char esp_data_4[98] =
{
    0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3, 0x00, 0xA0, 0x24, 0x15, 0x3E, 0x12, 0x08, 0x00, 0x45, 0x00,
    0x00, 0x54, 0x3E, 0x2A, 0x00, 0x00, 0x40, 0x32, 0xB8, 0xF5, 0xC0, 0xA8, 0x01, 0x05, 0xC0, 0xA8,
    0x01, 0x03, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x06, 0x61, 0xA8, 0xE5, 0x1A, 0xC4, 0x8A, 0x04,
    0x3F, 0x1B, 0x3C, 0xC7, 0xEE, 0x1A, 0xA4, 0x58, 0xC0, 0x80, 0x91, 0xD2, 0x93, 0xB8, 0x2C, 0x46,
    0xCB, 0xD5, 0x31, 0x36, 0x1B, 0xF8, 0xED, 0x7B, 0x9F, 0x42, 0xFF, 0xBC, 0xFE, 0x13, 0x24, 0xB0,
    0x18, 0xA7, 0x2A, 0x93, 0x31, 0x99, 0x87, 0x51, 0x84, 0x23, 0x59, 0x63, 0x4B, 0x41, 0x49, 0xBB,
    0xB7, 0x31,
} ;


dumpdev_packet esp_sequence[] = {
	{ INBOUND,  sizeof(esp_data_1), 				esp_data_1},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ INBOUND,  sizeof(esp_data_2), 				esp_data_2},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ INBOUND,  sizeof(esp_data_3), 				esp_data_3},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ INBOUND, sizeof(esp_data_4),	 				esp_data_4},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
	{ OUTBOUND,  			  	 0, 				0},
};


#define ESP_SEQUENCE_LENGTH (sizeof(esp_sequence) / sizeof(dumpdev_packet))
int esp_sequence_pos = 0;